package com.itfenghuang.day10;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class A05_字节流写数据异常处理 {
    public static void main(String[] args) {
        FileOutputStream fos =null;
        try{
//        写数据r
//        创建字节自流输出对象
            fos = new FileOutputStream("E:\\itfenghuang\\enen\\新建文本文档.txt");
            fos.write("凸(艹皿艹 )".getBytes());
//            int i = 1/0;
        }catch (IOException e){
            e.printStackTrace();
        }finally {
            if (fos!=null){
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }

            }
        }
    }
}
